#ifdef GrandCPU2012EWW
 #ifndef SetPortsH
  #define SetPortsH
  
#include    "board.h"

/****************************************************************************************************/
/*                                                                                                  */
/*                                 P I N S   D E F I N I S I O N                                    */
/*                                                                                                  */
/****************************************************************************************************/
  /*   PORT 0   */
  #define cts0     (1U<<4 ) //pin P0_4
  #define rts0     (1U<<5 ) //pin P0_5
  #define en24v    (1U<<6 ) //pin P0_6
  #define rts2     (1U<<8 ) //pin P0_8
  #define cts2     (1U<<9 ) //pin P0_9
  #define adr0     (1U<<12) //pin P0_12
  #define adr1     (1U<<13) //pin P0_13
  #define adr2     (1U<<14) //pin P0_14
  #define sdcd     (1U<<26) //pin P0_26
  #define adr3     (1U<<29) //pin P0_29
  #define pwr5     (1U<<30) //pin P0_30
  #define MADRmsk  ( adr0|adr1|adr2|adr3 ) //modul address mask
  #define MA012shft ( 12 - 0 ) //shift for lines adr0, adr1, adr2
  #define MA3shft   ( 29 - 3 ) //shift for line adr3
  /*   PORT 1   */
  #define pwr6     (1U<<18) //pin P1_18
  #define a16      (1U<<19) //pin P1_19
  #define a17      (1U<<20) //pin P1_20
  #define a18      (1U<<21) //pin P1_21
  #define cover1   (1U<<22) //pin P1_22
  #define cover2   (1U<<23) //pin P1_23
  #define di1      (1U<<24) //pin P1_24
  #define di2      (1U<<25) //pin P1_25
  #define acgood   (1U<<26) //pin P1_26
  #define status   (1U<<27) //pin P1_27
  #define opc      (1U<<28) //pin P1_28
  #define rxlev    (1U<<29) //pin P1_29
  #define rts3     (1U<<30) //pin P1_30
  #define gsmpon   (1U<<31) //pin P1_31
  #define RADRmsk  ( a16|a17|a18 ) //Ext RAM address mask
  #define RAshft   ( 19 - 16 )  //shift for lines a16, a17, a18
  /*   PORT 2   */
  #define gsmsim   (1U<<3 ) //pin P2_3
  #define gsmstat  (1U<<4 ) //pin P2_4
  #define gsmkey   (1U<<6 ) //pin P2_6
  #define pwrok    (1U<<8 ) //pin P2_8
  #define smba     (1U<<9 ) //pin P2_9
  #define boot     (1U<<10) //pin P2_10
  /*   PORT 3   */
  #define pwr8     (1U<<23) //pin P3_23
  #define pwr1     (1U<<24) //pin P3_24
  #define pwr2     (1U<<25) //pin P3_25
  #define pwr3     (1U<<26) //pin P3_26
  /*   PORT 4   */
  #define pwr4     (1U<<28) //pin P4_28
  #define erxdv    (1U<<29) //pin P4_29
  #define epwron   (1U<<31) //pin P4_31
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                        P O R T 0                                                 */
/*                                                                                                  */
/****************************************************************************************************/

/*          P I N S E L E C T    D E F I N E          */
 #define P0_0     ( P0_0_TXD3   )   //UART3
 #define P0_1     ( P0_1_RXD3   )   //UART3
 #define P0_2x     ( P0_2_TXD0   )   //UART0
 #define P0_3x     ( P0_3_RXD0   )   //UART0
 #define P0_4     ( P0_4_G      )   //UART0 CTS
 #define P0_5     ( P0_5_G      )   //UART0 RTS
 #define P0_6x     ( P0_6_G      )   //line "24V_EN"
 #define P0_7     ( P0_7_G      )   //line "RESERVE"
 #define P0_8     ( P0_8_G      )   //UART2 RTS
 #define P0_9     ( P0_9_G      )   //UART2 CTS
 #define P0_10    ( P0_10_TXD2  )   //UART2
 #define P0_11    ( P0_11_RXD2  )   //UART2
 #define P0_12x    ( P0_12_G     )   //line "ADR0"
 #define P0_13x    ( P0_13_G     )   //line "ADR1"
 #define P0_14x    ( P0_14_G     )   //line "ADR2"
 #define P0_15    ( P0_15_SCK   )   //SPI
 #define P0_16    ( P0_16_SSEL  )   //SPI
 #define P0_17    ( P0_17_MISO  )   //SPI
 #define P0_18    ( P0_18_MOSI  )   //SPI
 #define P0_19x    ( P0_19_MCCLK )   //SD/MMC
 #define P0_20x    ( P0_20_MCCMD )   //SD/MMC
 #define P0_21x    ( P0_21_MCPWR )   //SD/MMC
 #define P0_22x    ( P0_22_MCD0  )   //SD/MMC
 #define P0_23    ( P0_23_AD0_0 )   //line "INT_BAT"
 #define P0_24    ( P0_24_AD0_1 )   //line "EXT_BAT"
 #define P0_25    ( P0_25_AD0_2 )   //line "TEMP"
 #define P0_26x    ( P0_26_G     )   //line "SD_CD"
 #define P0_27    ( P0_27_SDA0  )   //I2C
 #define P0_28    ( P0_28_SCL0  )   //I2C
 #define P0_29x    ( P0_29_G     )   //line "ADR2"
 #define P0_30x    ( P0_30_G     )   //line "PWR5"
 #define P0_31    ( P0_31_UD2   )   //USB
 #define PINSEL0def  ( P0_0|P0_1|P0_2x|P0_3x|P0_4|P0_5|P0_6x|P0_7|P0_8|P0_9|P0_10|P0_11|P0_12x|P0_13x|P0_14x|P0_15 )
 #define PINSEL1def  ( P0_16|P0_17|P0_18|P0_19x|P0_20x|P0_21x|P0_22x|P0_23|P0_24|P0_25|P0_26x|P0_27|P0_28|P0_29x|P0_30x|P0_31 )

/*           P I N M O D E    D E F I N E             */
 #define p0_0     ( PullUp << 0  )   //UART3
 #define p0_1     ( PullUp << 2  )   //UART3
 #define p0_2     ( PullUp << 4  )   //UART0
 #define p0_3     ( PullUp << 6  )   //UART0
 #define p0_4     ( PullUp << 8  )   //UART0 CTS
 #define p0_5     ( PullUp << 10 )   //UART0 RTS
 #define p0_6     ( PullUp << 12 )   //line "24V_EN"
 #define p0_7     ( PullFl << 14 )   //line "RESERVE"
 #define p0_8     ( PullUp << 16 )   //UART2 RTS
 #define p0_9     ( PullUp << 18 )   //UART2 CTS
 #define p0_10    ( PullUp << 20 )   //UART2
 #define p0_11    ( PullUp << 22 )   //UART2
 #define p0_12    ( PullDn << 24 )   //line "ADR0"
 #define p0_13    ( PullDn << 26 )   //line "ADR1"
 #define p0_14    ( PullDn << 28 )   //line "ADR2"
 #define p0_15    ( PullUp << 30 )   //SPI
 #define p0_16    ( PullUp << 0  )   //SPI
 #define p0_17    ( PullUp << 2  )   //SPI
 #define p0_18    ( PullUp << 4  )   //SPI
 #define p0_19    ( PullUp << 6  )   //SD/MMC
 #define p0_20    ( PullUp << 8  )   //SD/MMC
 #define p0_21    ( PullUp << 10 )   //SD/MMC
 #define p0_22    ( PullUp << 12 )   //SD/MMC
 #define p0_23    ( PullUp << 14 )   //line "INT_BAT"
 #define p0_24    ( PullUp << 16 )   //line "EXT_BAT"
 #define p0_25    ( PullUp << 18 )   //line "TEMP"
 #define p0_26    ( PullUp << 20 )   //line "SD_CD"
 #define p0_27    ( PullUp << 22 )   //I2C
 #define p0_28    ( PullUp << 24 )   //I2C
 #define p0_29    ( PullUp << 26 )   //line "ADR2"
 #define p0_30    ( PullUp << 28 )   //line "PWR5"
 #define p0_31    ( PullUp << 30 )   //USB
 #define PINMODE0def  ( p0_0|p0_1|p0_2|p0_3|p0_4|p0_5|p0_6|p0_7|p0_8|p0_9|p0_10|p0_11|p0_12|p0_13|p0_14|p0_15 )
 #define PINMODE1def  ( p0_16|p0_17|p0_18|p0_19|p0_20|p0_21|p0_22|p0_23|p0_24|p0_25|p0_26|p0_27|p0_28|p0_29|p0_30|p0_31 )

/*           F I O D I R    D E F I N E           */
 #define d0_0     ( Out << 0  )   //UART3, TxD
 #define d0_1     ( In  << 1  )   //UART3, RxD
 #define d0_2     ( Out << 2  )   //UART0, TxD
 #define d0_3     ( In  << 3  )   //UART0, RxD
 #define d0_4     ( In  << 4  )   //UART0 CTS
 #define d0_5     ( Out << 5  )   //UART0 RTS
 #define d0_6     ( Out << 6  )   //line "24V_EN"
 #define d0_7     ( In  << 7  )   //line "RESERVE"
 #define d0_8     ( Out << 8  )   //UART2 RTS
 #define d0_9     ( In  << 9  )   //UART2 CTS
 #define d0_10    ( Out << 10 )   //UART2, TxD
 #define d0_11    ( In  << 11 )   //UART2, RxD
 #define d0_12    ( Out << 12 )   //line "ADR0"
 #define d0_13    ( Out << 13 )   //line "ADR1"
 #define d0_14    ( Out << 14 )   //line "ADR2"
 #define d0_15    ( Out << 15 )   //SPI, SCK
 #define d0_16    ( Out << 16 )   //SPI, SSEL
 #define d0_17    ( In  << 17 )   //SPI, MISO
 #define d0_18    ( Out << 18 )   //SPI, MOSI
 #define d0_19    ( Out << 19 )   //SD/MMC, MCICLK
 #define d0_20    ( In  << 20 )   //SD/MMC, MCICMD
 #define d0_21    ( Out << 21 )   //SD/MMC, MCIPWR
 #define d0_22    ( Out << 22 )   //SD/MMC, MCIDAT0
 #define d0_23    ( In  << 23 )   //line "INT_BAT"
 #define d0_24    ( In  << 24 )   //line "EXT_BAT"
 #define d0_25    ( In  << 25 )   //line "TEMP"
 #define d0_26    ( In  << 26 )   //line "SD_CD"
 #define d0_27    ( Out << 27 )   //I2C
 #define d0_28    ( Out << 28 )   //I2C
 #define d0_29    ( Out << 29 )   //line "ADR2"
 #define d0_30    ( Out << 30 )   //line "PWR5"
 #define d0_31    ( Out << 31 )   //USB
 #define fio0dir1   ( d0_0|d0_1|d0_2|d0_3|d0_4|d0_5|d0_6|d0_7|d0_8|d0_9|d0_10|d0_11|d0_12|d0_13|d0_14|d0_15|d0_16 )
 #define fio0dir2   ( d0_17|d0_18|d0_19|d0_20|d0_21|d0_22|d0_23|d0_24|d0_25|d0_26|d0_27|d0_28|d0_29|d0_30|d0_31 )
 #define FIO0DIRdef ( fio0dir1|fio0dir2 )

/*          F I O M A S K    D E F I N E            */
 #define m0_0     ( Off << 0  )   //UART3, TxD
 #define m0_1     ( Off << 1  )   //UART3, RxD
 #define m0_2     ( Off << 2  )   //UART0, TxD
 #define m0_3     ( Off << 3  )   //UART0, RxD
 #define m0_4     ( On  << 4  )   //UART0 CTS
 #define m0_5     ( On  << 5  )   //UART0 RTS
 #define m0_6     ( On  << 6  )   //line "24V_EN"
 #define m0_7     ( Off << 7  )   //line "RESERVE"
 #define m0_8     ( On  << 8  )   //UART2 RTS
 #define m0_9     ( On  << 9  )   //UART2 CTS
 #define m0_10    ( Off << 10 )   //UART2, TxD
 #define m0_11    ( Off << 11 )   //UART2, RxD
 #define m0_12    ( On  << 12 )   //line "ADR0"
 #define m0_13    ( On  << 13 )   //line "ADR1"
 #define m0_14    ( On  << 14 )   //line "ADR2"
 #define m0_15    ( Off << 15 )   //SPI, SCK
 #define m0_16    ( Off << 16 )   //SPI, SSEL
 #define m0_17    ( Off << 17 )   //SPI, MISO
 #define m0_18    ( Off << 18 )   //SPI, MOSI
 #define m0_19    ( Off << 19 )   //SD/MMC, MCICLK
 #define m0_20    ( Off << 20 )   //SD/MMC, MCICMD
 #define m0_21    ( Off << 21 )   //SD/MMC, MCIPWR
 #define m0_22    ( Off << 22 )   //SD/MMC, MCIDAT0
 #define m0_23    ( Off << 23 )   //line "INT_BAT"
 #define m0_24    ( Off << 24 )   //line "EXT_BAT"
 #define m0_25    ( Off << 25 )   //line "TEMP"
 #define m0_26    ( On  << 26 )   //line "SD_CD"
 #define m0_27    ( Off << 27 )   //I2C
 #define m0_28    ( Off << 28 )   //I2C
 #define m0_29    ( On  << 29 )   //line "ADR2"
 #define m0_30    ( On  << 30 )   //line "PWR5"
 #define m0_31    ( Off << 31 )   //USB
 #define fio0msk1   ( m0_0|m0_1|m0_2|m0_3|m0_4|m0_5|m0_6|m0_7|m0_8|m0_9|m0_10|m0_11|m0_12|m0_13|m0_14|m0_15|m0_16 )
 #define fio0msk2   ( m0_17|m0_18|m0_19|m0_20|m0_21|m0_22|m0_23|m0_24|m0_25|m0_26|m0_27|m0_28|m0_29|m0_30|m0_31 )
 #define FIO0MASKdef ( fio0msk1|fio0msk2 )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                        P O R T 1                                                 */
/*                                                                                                  */
/****************************************************************************************************/

/*          P I N S E L E C T    D E F I N E          */
 #define P1_0     ( P1_0_ETXD0  )   //ETHERNET
 #define P1_1     ( P1_1_ETXD1  )   //ETHERNET
 #define P1_4     ( P1_4_ETXEN  )   //ETHERNET
 #define P1_8     ( P1_8_ECRS   )   //ETHERNET
 #define P1_9     ( P1_9_ERXD0  )   //ETHERNET
 #define P1_10    ( P1_10_ERXD1 )   //ETHERNET
 #define P1_14    ( P1_14_ERXER )   //ETHERNET
 #define P1_15x    ( P1_15_ERFCLK)   //ETHERNET
 #define P1_16x    ( P1_16_EMDC  )   //ETHERNET
 #define P1_17    ( P1_17_EMDIO )   //ETHERNET
 #define P1_18x    ( P1_18_G     )   //line "PWR6"
 #define P1_19    ( P1_19_G     )   //line "A16"
 #define P1_20    ( P1_20_G     )   //line "A17"
 #define P1_21    ( P1_21_G     )   //line "A18"
 #define P1_22x    ( P1_22_G     )   //line "COVER1"
 #define P1_23x    ( P1_23_G     )   //line "COVER2"
 #define P1_24x    ( P1_24_G     )   //line "DI1"
 #define P1_25x    ( P1_25_G     )   //line "DI2"
 #define P1_26x    ( P1_26_G     )   //line "AC_good"
 #define P1_27x    ( P1_27_G     )   //line Led "Status"
 #define P1_28x    ( P1_28_G     )   //line Led "OPC"
 #define P1_29x    ( P1_29_G     )   //line Led "RxLev"
 #define P1_30    ( P1_30_G     )   //UART3 RTS
 #define P1_31x    ( P1_31_G     )   //line "GSM_PWR_ON"
 #define PINSEL2def  ( P1_0|P1_1|P1_4|P1_8|P1_9|P1_10|P1_14|P1_15x )
 #define PINSEL3def  ( P1_16x|P1_17|P1_18x|P1_19|P1_20|P1_21|P1_22x|P1_23x|P1_24x|P1_25x|P1_26x|P1_27x|P1_28x|P1_29x|P1_30|P1_31x)

/*           P I N M O D E    D E F I N E             */
 #define p1_0     ( PullUp << 0  )   //ETHERNET
 #define p1_1     ( PullUp << 2  )   //ETHERNET
 #define p1_4     ( PullUp << 8  )   //ETHERNET
 #define p1_8     ( PullUp << 16 )   //ETHERNET
 #define p1_9     ( PullUp << 18 )   //ETHERNET
 #define p1_10    ( PullUp << 20 )   //ETHERNET
 #define p1_14    ( PullUp << 28 )   //ETHERNET
 #define p1_15    ( PullUp << 30 )   //ETHERNET
 #define p1_16    ( PullUp << 0  )   //ETHERNET
 #define p1_17    ( PullUp << 2  )   //ETHERNET
 #define p1_18    ( PullUp << 4  )   //line "PWR6"
 #define p1_19    ( PullUp << 6  )   //line "A16"
 #define p1_20    ( PullUp << 8  )   //line "A17"
 #define p1_21    ( PullUp << 10 )   //line "A18"
 #define p1_22    ( PullUp << 12 )   //line "COVER1"
 #define p1_23    ( PullUp << 14 )   //line "COVER2"
 #define p1_24    ( PullUp << 16 )   //line "DI1"
 #define p1_25    ( PullUp << 18 )   //line "DI2"
 #define p1_26    ( PullUp << 20 )   //line "AC_good"
 #define p1_27    ( PullUp << 22 )   //line Led "Status"
 #define p1_28    ( PullUp << 24 )   //line Led "OPC"
 #define p1_29    ( PullUp << 26 )   //line Led "RxLev"
 #define p1_30    ( PullUp << 28 )   //UART3 RTS
 #define p1_31    ( PullUp << 30 )   //line "GSM_PWR_ON"
 #define PINMODE2def  ( p1_0|p1_1|p1_4|p1_8|p1_9|p1_10|p1_14|p1_15 )
 #define PINMODE3def  ( p1_16|p1_17|p1_18|p1_19|p1_20|p1_21|p1_22|p1_23|p1_24|p1_25|p1_26|p1_27|p1_28|p1_29|p1_30|p1_31 )

/*           F I O D I R    D E F I N E           */
 #define d1_0     ( Out << 0  )   //ETHERNET
 #define d1_1     ( Out << 1  )   //ETHERNET
 #define d1_4     ( Out << 4  )   //ETHERNET
 #define d1_8     ( In  << 8  )   //ETHERNET
 #define d1_9     ( In  << 9  )   //ETHERNET
 #define d1_10    ( In  << 10 )   //ETHERNET
 #define d1_14    ( In  << 14 )   //ETHERNET
 #define d1_15    ( In  << 15 )   //ETHERNET
 #define d1_16    ( Out << 16 )   //ETHERNET
 #define d1_17    ( Out << 17 )   //ETHERNET
 #define d1_18    ( Out << 18 )   //line "PWR6"
 #define d1_19    ( Out << 19 )   //line "A16"
 #define d1_20    ( Out << 20 )   //line "A17"
 #define d1_21    ( Out << 21 )   //line "A18"
 #define d1_22    ( In  << 22 )   //line "COVER1"
 #define d1_23    ( In  << 23 )   //line "COVER2"
 #define d1_24    ( In  << 24 )   //line "DI1"
 #define d1_25    ( In  << 25 )   //line "DI2"
 #define d1_26    ( In  << 26 )   //line "AC_good"
 #define d1_27    ( Out << 27 )   //line Led "Status"
 #define d1_28    ( Out << 28 )   //line Led "OPC"
 #define d1_29    ( Out << 29 )   //line Led "RxLev"
 #define d1_30    ( Out << 30 )   //UART3 RTS
 #define d1_31    ( Out << 31 )   //line "GSM_PWR_ON"
 #define fio1dir1  ( d1_0|d1_1|d1_4|d1_8|d1_9|d1_10|d1_14|d1_15|d1_16|d1_17|d1_18|d1_19 )
 #define fio1dir2  ( d1_20|d1_21|d1_22|d1_23|d1_24|d1_25|d1_26|d1_27|d1_28|d1_29|d1_30|d1_31 )
 #define FIO1DIRdef ( fio1dir1|fio1dir2 )

/*          F I O M A S K    D E F I N E            */
 #define m1_0     ( Off << 0  )   //ETHERNET
 #define m1_1     ( Off << 1  )   //ETHERNET
 #define m1_4     ( Off << 4  )   //ETHERNET
 #define m1_8     ( Off << 8  )   //ETHERNET
 #define m1_9     ( Off << 9  )   //ETHERNET
 #define m1_10    ( Off << 10 )   //ETHERNET
 #define m1_14    ( Off << 14 )   //ETHERNET
 #define m1_15    ( Off << 15 )   //ETHERNET
 #define m1_16    ( Off << 16 )   //ETHERNET
 #define m1_17    ( Off << 17 )   //ETHERNET
 #define m1_18    ( On  << 18 )   //line "PWR6"
 #define m1_19    ( On  << 19 )   //line "A16"
 #define m1_20    ( On  << 20 )   //line "A17"
 #define m1_21    ( On  << 21 )   //line "A18"
 #define m1_22    ( On  << 22 )   //line "COVER1"
 #define m1_23    ( On  << 23 )   //line "COVER2"
 #define m1_24    ( On  << 24 )   //line "DI1"
 #define m1_25    ( On  << 25 )   //line "DI2"
 #define m1_26    ( On  << 26 )   //line "AC_good"
 #define m1_27    ( On  << 27 )   //line Led "Status"
 #define m1_28    ( On  << 28 )   //line Led "OPC"
 #define m1_29    ( On  << 29 )   //line Led "RxLev"
 #define m1_30    ( On  << 30 )   //UART3 RTS
 #define m1_31    ( On  << 31 )   //line "GSM_PWR_ON"
 #define fio1msk1  ( m1_0|m1_1|m1_4|m1_8|m1_9|m1_10|m1_14|m1_15|m1_16|m1_17|m1_18|m1_19 )
 #define fio1msk2  ( m1_20|m1_21|m1_22|m1_23|m1_24|m1_25|m1_26|m1_27|m1_28|m1_29|m1_30|m1_31 )
 #define FIO1MASKdef ( fio1msk1|fio1msk2 )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                        P O R T 2                                                 */
/*                                                                                                  */
/****************************************************************************************************/

/*          P I N S E L E C T    D E F I N E          */
 #define P2_0x     ( P2_0_TXD1   )   //UART1
 #define P2_1x     ( P2_1_RXD1   )   //UART1
 #define P2_2x     ( P2_2_CTS1   )   //UART1
 #define P2_3x     ( P2_3_G      )   //line "GSM_SIM"
 #define P2_4x     ( P2_4_G      )   //line "GSM_STAT"
 #define P2_5x     ( P2_5_DTR1   )   //UART1
 #define P2_6x    ( P2_6_G      )   //line "GSM_KEY"
 #define P2_7x     ( P2_7_RTS1   )   //UART1
 #define P2_8x     ( P2_8_G      )   //line "PWR_OK"

 #define P2_10x    ( P2_10_G     )   //line "Boot"
 #define P2_11x    ( P2_11_MCD1  )   //SD/MMC
 #define P2_12x    ( P2_12_MCD2  )   //SD/MMC
 #define P2_13x    ( P2_13_MCD3  )   //SD/MMC
 #define PINSEL4def  ( P2_0x|P2_1x|P2_2x|P2_3x|P2_4x|P2_5x|P2_6x|P2_7x|P2_8x|P2_10x|P2_11x|P2_12x|P2_13x )

/*           P I N M O D E    D E F I N E             */
 #define p2_0x     ( PullUp << 0  )   //UART1
 #define p2_1x     ( PullUp << 2  )   //UART1
 #define p2_2x     ( PullUp << 4  )   //UART1
 #define p2_3x     ( PullUp << 6  )   //line "GSM_SIM"
 #define p2_4x     ( PullUp << 8  )   //line "GSM_STAT"
 #define p2_5x     ( PullUp << 10 )   //UART1
 #define p2_6x     ( PullUp << 12 )   //line "GSM_KEY"
 #define p2_7x     ( PullUp << 14 )   //UART1
 #define p2_8x     ( PullUp << 16 )   //line "PWR_OK"

 #define p2_10x    ( PullUp << 20 )   //line "Boot"
 #define p2_11x    ( PullUp << 22 )   //SD/MMC
 #define p2_12x    ( PullUp << 24 )   //SD/MMC
 #define p2_13x    ( PullUp << 26 )   //SD/MMC
 #define PINMODE4def  ( p2_0x|p2_1x|p2_2x|p2_3x|p2_4x|p2_5x|p2_6x|p2_7x|p2_8x|p2_10x|p2_11x|p2_12x|p2_13x )

/*           F I O D I R    D E F I N E           */
 #define d2_0     ( Out << 0  )   //UART1, TxD
 #define d2_1     ( In  << 1  )   //UART1, RxD
 #define d2_2     ( In  << 2  )   //UART1, CTS
 #define d2_3     ( Out << 3  )   //line "GSM_SIM"
 #define d2_4     ( In  << 4  )   //line "GSM_STAT"
 #define d2_5     ( Out << 5  )   //UART1, DTR
 #define d2_6     ( Out << 6  )   //line "GSM_KEY"
 #define d2_7     ( Out << 7  )   //UART1, RTS
 #define d2_8     ( In  << 8  )   //line "PWR_OK"
 #define d2_9     ( Out << 9  )   //line "SMBA", become input after moduls initialisation
 #define d2_10    ( In  << 10 )   //line "Boot"
 #define d2_11    ( Out << 11 )   //SD/MMC, MCIDAT1
 #define d2_12    ( Out << 12 )   //SD/MMC, MCIDAT2
 #define d2_13    ( Out << 13 )   //SD/MMC, MCIDAT3
 #define FIO2DIRdef  ( d2_0|d2_1|d2_2|d2_3|d2_4|d2_5|d2_6|d2_7|d2_8|d2_9|d2_10|d2_11|d2_12|d2_13 )

/*          F I O M A S K    D E F I N E            */
 #define m2_0x     ( Off << 0  )   //UART1, TxD
 #define m2_1x     ( Off << 1  )   //UART1, RxD
 #define m2_2x     ( Off << 2  )   //UART1, CTS
 #define m2_3x     ( On  << 3  )   //line "GSM_SIM"
 #define m2_4x     ( On  << 4  )   //line "GSM_STAT"
 #define m2_5x     ( Off << 5  )   //UART1, DTR
 #define m2_6x     ( On  << 6  )   //line "GSM_KEY"
 #define m2_7x     ( Off << 7  )   //UART1, RTS
 #define m2_8x     ( On  << 8  )   //line "PWR_OK"

 #define m2_10x    ( Off << 10 )   //line "Boot"
 #define m2_11x    ( Off << 11 )   //SD/MMC, MCIDAT1
 #define m2_12x    ( Off << 12 )   //SD/MMC, MCIDAT2
 #define m2_13x    ( Off << 13 )   //SD/MMC, MCIDAT3
 #define FIO2MASKdef  ( m2_0x|m2_1x|m2_2x|m2_3x|m2_4x|m2_5x|m2_6x|m2_7x|m2_8x|m2_10x|m2_11x|m2_12x|m2_13x )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                        P O R T 3                                                 */
/*                                                                                                  */
/****************************************************************************************************/

/*          P I N S E L E C T    D E F I N E          */
 #define P3_0     ( P3_3_D0     )   //External memory
 #define P3_1     ( P3_4_D1     )   //External memory
 #define P3_2     ( P3_5_D2     )   //External memory
 #define P3_3     ( P3_6_D3     )   //External memory
 #define P3_4     ( P3_7_D4     )   //External memory
 #define P3_5     ( P3_8_D5     )   //External memory
 #define P3_6     ( P3_9_D6     )   //External memory
 #define P3_7     ( P3_10_D7    )   //External memory
 #define P3_23x    ( P3_23_G     )   //line "PWR8"
 #define P3_24x    ( P3_24_G     )   //line "PWR1"
 #define P3_25x    ( P3_25_G     )   //line "PWR2"
 #define P3_26x    ( P3_26_G     )   //line "PWR3"
 #define PINSEL6def  ( P3_0|P3_1|P3_2|P3_3|P3_4|P3_5|P3_6|P3_7 )
 #define PINSEL7def  ( P3_23x|P3_24x|P3_25x|P3_26x )

/*           P I N M O D E    D E F I N E             */
 #define p3_0     ( PullUp << 0  )   //External memory
 #define p3_1     ( PullUp << 2  )   //External memory
 #define p3_2     ( PullUp << 4  )   //External memory
 #define p3_3     ( PullUp << 6  )   //External memory
 #define p3_4     ( PullUp << 8  )   //External memory
 #define p3_5     ( PullUp << 10 )   //External memory
 #define p3_6     ( PullUp << 12 )   //External memory
 #define p3_7     ( PullUp << 14 )   //External memory
 #define p3_23    ( PullUp << 14 )   //line "PWR8"
 #define p3_24    ( PullUp << 16 )   //line "PWR1"
 #define p3_25    ( PullUp << 18 )   //line "PWR2"
 #define p3_26    ( PullUp << 20 )   //line "PWR3"
 #define PINMODE6def  ( p3_0|p3_1|p3_2|p3_3|p3_4|p3_5|p3_6|p3_7 )
 #define PINMODE7def  ( p3_23|p3_24|p3_25|p3_26 )

/*           F I O D I R    D E F I N E           */
 #define d3_0     ( In  << 0  )   //External memory
 #define d3_1     ( In  << 1  )   //External memory
 #define d3_2     ( In  << 2  )   //External memory
 #define d3_3     ( In  << 3  )   //External memory
 #define d3_4     ( In  << 4  )   //External memory
 #define d3_5     ( In  << 5  )   //External memory
 #define d3_6     ( In  << 6  )   //External memory
 #define d3_7     ( In  << 7  )   //External memory
 #define d3_23    ( Out << 23 )   //line "PWR8"
 #define d3_24    ( Out << 24 )   //line "PWR1"
 #define d3_25    ( Out << 25 )   //line "PWR2"
 #define d3_26    ( Out << 26 )   //line "PWR3"
 #define FIO3DIRdef  ( d3_0|d3_1|d3_2|d3_3|d3_4|d3_5|d3_6|d3_7|d3_23|d3_24|d3_25|d3_26 )

/*          F I O M A S K    D E F I N E            */
 #define m3_0     ( Off << 0  )   //External memory
 #define m3_1     ( Off << 1  )   //External memory
 #define m3_2     ( Off << 2  )   //External memory
 #define m3_3     ( Off << 3  )   //External memory
 #define m3_4     ( Off << 4  )   //External memory
 #define m3_5     ( Off << 5  )   //External memory
 #define m3_6     ( Off << 6  )   //External memory
 #define m3_7     ( Off << 7  )   //External memory
 #define m3_23    ( On  << 23 )   //line "PWR8"
 #define m3_24    ( On  << 24 )   //line "PWR1"
 #define m3_25    ( On  << 25 )   //line "PWR2"
 #define m3_26    ( On  << 26 )   //line "PWR3"
 #define FIO3MASKdef  ( m3_0|m3_1|m3_2|m3_3|m3_4|m3_5|m3_6|m3_7|m3_23|m3_24|m3_25|m3_26 )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                        P O R T 3                                                 */
/*                                                                                                  */
/****************************************************************************************************/

/*          P I N S E L E C T    D E F I N E          */
 #define P4_0     ( P4_0_A0     )   //External memory
 #define P4_1     ( P4_1_A1     )   //External memory
 #define P4_2     ( P4_2_A2     )   //External memory
 #define P4_3     ( P4_3_A3     )   //External memory
 #define P4_4     ( P4_4_A4     )   //External memory
 #define P4_5     ( P4_5_A5     )   //External memory
 #define P4_6     ( P4_6_A6     )   //External memory
 #define P4_7     ( P4_7_A7     )   //External memory
 #define P4_8     ( P4_8_A8     )   //External memory
 #define P4_9     ( P4_9_A9     )   //External memory
 #define P4_10    ( P4_10_A10   )   //External memory
 #define P4_11    ( P4_11_A11   )   //External memory
 #define P4_12    ( P4_12_A12   )   //External memory
 #define P4_13    ( P4_13_A13   )   //External memory
 #define P4_14    ( P4_14_A14   )   //External memory
 #define P4_15    ( P4_15_A15   )   //External memory
 #define P4_24    ( P4_24_OE    )   //External memory
 #define P4_25    ( P4_25_BLS0  )   //External memory
 #define P4_28x    ( P4_28_G     )   //line "PWR4"
 #define P4_29    ( P4_29_G     )   //line "Eth_RxDV"
 #define P4_30    ( P4_30_CS0   )   //External memory
 #define P4_31x    ( P4_31_G     )   //line "Eth_PWR_ON"
 #define PINSEL8def  ( P4_0|P4_1|P4_2|P4_3|P4_4|P4_5|P4_6|P4_7|P4_8|P4_9|P4_10|P4_11|P4_12|P4_13|P4_14|P4_15 )
 #define PINSEL9def  ( P4_24|P4_25|P4_28x|P4_29|P4_30|P4_31x )

/*           P I N M O D E    D E F I N E             */
 #define p4_0     ( PullUp << 0  )   //External memory
 #define p4_1     ( PullUp << 2  )   //External memory
 #define p4_2     ( PullUp << 4  )   //External memory
 #define p4_3     ( PullUp << 6  )   //External memory
 #define p4_4     ( PullUp << 8  )   //External memory
 #define p4_5     ( PullUp << 10 )   //External memory
 #define p4_6     ( PullUp << 12 )   //External memory
 #define p4_7     ( PullUp << 14 )   //External memory
 #define p4_8     ( PullUp << 16 )   //External memory
 #define p4_9     ( PullUp << 18 )   //External memory
 #define p4_10    ( PullUp << 20 )   //External memory
 #define p4_11    ( PullUp << 22 )   //External memory
 #define p4_12    ( PullUp << 24 )   //External memory
 #define p4_13    ( PullUp << 26 )   //External memory
 #define p4_14    ( PullUp << 28 )   //External memory
 #define p4_15    ( PullUp << 30 )   //External memory
 #define p4_24    ( PullUp << 16 )   //External memory
 #define p4_25    ( PullUp << 18 )   //External memory
 #define p4_28    ( PullUp << 24 )   //line "PWR4"
 #define p4_29    ( PullUp << 26 )   //line "Eth_RxDV"
 #define p4_30    ( PullUp << 28 )   //External memory
 #define p4_31    ( PullUp << 30 )   //line "Eth_PWR_ON"
 #define PINMODE8def  ( p4_0|p4_1|p4_2|p4_3|p4_4|p4_5|p4_6|p4_7|p4_8|p4_9|p4_10|p4_11|p4_12|p4_13|p4_14|p4_15 )
 #define PINMODE9def  ( p4_24|p4_25|p4_28|p4_29|p4_30|p4_31 )

/*           F I O D I R    D E F I N E           */
 #define d4_0     ( Out << 0  )   //External memory
 #define d4_1     ( Out << 1  )   //External memory
 #define d4_2     ( Out << 2  )   //External memory
 #define d4_3     ( Out << 3  )   //External memory
 #define d4_4     ( Out << 4  )   //External memory
 #define d4_5     ( Out << 5  )   //External memory
 #define d4_6     ( Out << 6  )   //External memory
 #define d4_7     ( Out << 7  )   //External memory
 #define d4_8     ( Out << 8  )   //External memory
 #define d4_9     ( Out << 9  )   //External memory
 #define d4_10    ( Out << 10 )   //External memory
 #define d4_11    ( Out << 11 )   //External memory
 #define d4_12    ( Out << 12 )   //External memory
 #define d4_13    ( Out << 13 )   //External memory
 #define d4_14    ( Out << 14 )   //External memory
 #define d4_15    ( Out << 15 )   //External memory
 #define d4_24    ( Out << 24 )   //External memory
 #define d4_25    ( Out << 25 )   //External memory
 #define d4_28    ( Out << 28 )   //line "PWR4"
 #define d4_29    ( In  << 29 )   //line "Eth_RxDV"
 #define d4_30    ( Out << 30 )   //External memory
 #define d4_31    ( Out << 31 )   //line "Eth_PWR_ON"
 #define fio4dir1 ( d4_0|d4_1|d4_2|d4_3|d4_4|d4_5|d4_6|d4_7|d4_8|d4_9|d4_10|d4_11|d4_12|d4_13|d4_14 )
 #define fio4dir2 ( d4_15|d4_24|d4_25|d4_28|d4_29|d4_30|d4_31 )
 #define FIO4DIRdef ( fio4dir1|fio4dir2 )

/*          F I O M A S K    D E F I N E            */
 #define m4_0     ( Off << 0  )   //External memory
 #define m4_1     ( Off << 1  )   //External memory
 #define m4_2     ( Off << 2  )   //External memory
 #define m4_3     ( Off << 3  )   //External memory
 #define m4_4     ( Off << 4  )   //External memory
 #define m4_5     ( Off << 5  )   //External memory
 #define m4_6     ( Off << 6  )   //External memory
 #define m4_7     ( Off << 7  )   //External memory
 #define m4_8     ( Off << 8  )   //External memory
 #define m4_9     ( Off << 9  )   //External memory
 #define m4_10    ( Off << 10 )   //External memory
 #define m4_11    ( Off << 11 )   //External memory
 #define m4_12    ( Off << 12 )   //External memory
 #define m4_13    ( Off << 13 )   //External memory
 #define m4_14    ( Off << 14 )   //External memory
 #define m4_15    ( Off << 15 )   //External memory
 #define m4_24    ( Off << 24 )   //External memory
 #define m4_25    ( Off << 25 )   //External memory
 #define m4_28    ( On  << 28 )   //line "PWR4"
 #define m4_29    ( On  << 29 )   //line "Eth_RxDV"
 #define m4_30    ( Off << 30 )   //External memory
 #define m4_31    ( On  << 31 )   //line "Eth_PWR_ON"
 #define fio4msk1 ( m4_0|m4_1|m4_2|m4_3|m4_4|m4_5|m4_6|m4_7|m4_8|m4_9|m4_10|m4_11|m4_12|m4_13|m4_14 )
 #define fio4msk2 ( m4_15|m4_24|m4_25|m4_28|m4_29|m4_30|m4_31 )
 #define FIO4MASKdef ( fio4msk1|fio4msk2 )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                 P O R T 0   I N T E R R U P T S                                  */
/*                                                                                                  */
/****************************************************************************************************/

/*          I O 0 I n t E n R    D E F I N E          */
 #define ER0_0    ( Off << 0  )   //UART3, TxD
 #define ER0_1    ( Off << 1  )   //UART3, RxD
 #define ER0_2    ( Off << 2  )   //UART0, TxD
 #define ER0_3    ( Off << 3  )   //UART0, RxD
 #define ER0_4    ( Off << 4  )   //UART0 CTS
 #define ER0_5    ( Off << 5  )   //UART0 RTS
 #define ER0_6    ( Off << 6  )   //line "24V_EN"
 #define ER0_7    ( Off << 7  )   //line "RESERVE"
 #define ER0_8    ( Off << 8  )   //UART2 RTS
 #define ER0_9    ( Off << 9  )   //UART2 CTS
 #define ER0_10   ( Off << 10 )   //UART2, TxD
 #define ER0_11   ( Off << 11 )   //UART2, RxD
 #define ER0_12   ( Off << 12 )   //line "ADR0"
 #define ER0_13   ( Off << 13 )   //line "ADR1"
 #define ER0_14   ( Off << 14 )   //line "ADR2"
 #define ER0_15   ( Off << 15 )   //SPI, SCK
 #define ER0_16   ( Off << 16 )   //SPI, SSEL
 #define ER0_17   ( Off << 17 )   //SPI, MISO
 #define ER0_18   ( Off << 18 )   //SPI, MOSI
 #define ER0_19   ( Off << 19 )   //SD/MMC, MCICLK
 #define ER0_20   ( Off << 20 )   //SD/MMC, MCICMD
 #define ER0_21   ( Off << 21 )   //SD/MMC, MCIPWR
 #define ER0_22   ( Off << 22 )   //SD/MMC, MCIDAT0
 #define ER0_23   ( Off << 23 )   //line "INT_BAT"
 #define ER0_24   ( Off << 24 )   //line "EXT_BAT"
 #define ER0_25   ( Off << 25 )   //line "TEMP"
 #define ER0_26   ( Off << 26 )   //line "SD_CD"??????????????????????????????????????
 #define ER0_27   ( Off << 27 )   //I2C
 #define ER0_28   ( Off << 28 )   //I2C
 #define ER0_29   ( Off << 29 )   //line "ADR2"
 #define ER0_30   ( Off << 30 )   //line "PWR5"
 #define ER0_31   ( Off << 31 )   //USB
 #define p0ER1   ( ER0_0|ER0_1|ER0_2|ER0_3|ER0_4|ER0_5|ER0_6|ER0_7|ER0_8|ER0_9|ER0_10|ER0_11|ER0_12 )
 #define p0ER2   ( ER0_13|ER0_14|ER0_15|ER0_16|ER0_17|ER0_18|ER0_19|ER0_20|ER0_21|ER0_22|ER0_23 )
 #define p0ER3   ( ER0_24|ER0_25|ER0_26|ER0_27|ER0_28|ER0_29|ER0_30|ER0_31 )
 #define IO0IntEnRdef ( p0ER1|p0ER2|p0ER3 )

/*          I O 0 I n t E n F    D E F I N E          */
 #define EF0_0    ( Off << 0  )   //UART3, TxD
 #define EF0_1    ( Off << 1  )   //UART3, RxD
 #define EF0_2    ( Off << 2  )   //UART0, TxD
 #define EF0_3    ( Off << 3  )   //UART0, RxD
 #define EF0_4    ( Off << 4  )   //UART0 CTS
 #define EF0_5    ( Off << 5  )   //UART0 RTS
 #define EF0_6    ( Off << 6  )   //line "24V_EN"
 #define EF0_7    ( Off << 7  )   //line "RESERVE"
 #define EF0_8    ( Off << 8  )   //UART2 RTS
 #define EF0_9    ( Off << 9  )   //UART2 CTS
 #define EF0_10   ( Off << 10 )   //UART2, TxD
 #define EF0_11   ( Off << 11 )   //UART2, RxD
 #define EF0_12   ( Off << 12 )   //line "ADR0"
 #define EF0_13   ( Off << 13 )   //line "ADR1"
 #define EF0_14   ( Off << 14 )   //line "ADR2"
 #define EF0_15   ( Off << 15 )   //SPI, SCK
 #define EF0_16   ( Off << 16 )   //SPI, SSEL
 #define EF0_17   ( Off << 17 )   //SPI, MISO
 #define EF0_18   ( Off << 18 )   //SPI, MOSI
 #define EF0_19   ( Off << 19 )   //SD/MMC, MCICLK
 #define EF0_20   ( Off << 20 )   //SD/MMC, MCICMD
 #define EF0_21   ( Off << 21 )   //SD/MMC, MCIPWR
 #define EF0_22   ( Off << 22 )   //SD/MMC, MCIDAT0
 #define EF0_23   ( Off << 23 )   //line "INT_BAT"
 #define EF0_24   ( Off << 24 )   //line "EXT_BAT"
 #define EF0_25   ( Off << 25 )   //line "TEMP"
 #define EF0_26   ( Off << 26 )   //line "SD_CD"??????????????????????????????????????
 #define EF0_27   ( Off << 27 )   //I2C
 #define EF0_28   ( Off << 28 )   //I2C
 #define EF0_29   ( Off << 29 )   //line "ADR2"
 #define EF0_30   ( Off << 30 )   //line "PWR5"
 #define EF0_31   ( Off << 31 )   //USB
 #define p0EF1   ( EF0_0|EF0_1|EF0_2|EF0_3|EF0_4|EF0_5|EF0_6|EF0_7|EF0_8|EF0_9|EF0_10|EF0_11|EF0_12 )
 #define p0EF2   ( EF0_13|EF0_14|EF0_15|EF0_16|EF0_17|EF0_18|EF0_19|EF0_20|EF0_21|EF0_22|EF0_23 )
 #define p0EF3   ( EF0_24|EF0_25|EF0_26|EF0_27|EF0_28|EF0_29|EF0_30|EF0_31 )
 #define IO0IntEnFdef ( p0EF1|p0EF2|p0EF3 )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/




/****************************************************************************************************/
/*                                                                                                  */
/*                                 P O R T 2   I N T E R R U P T S                                  */
/*                                                                                                  */
/****************************************************************************************************/

/*          I O 2 I n t E n R    D E F I N E          */
 #define ER2_0    ( Off << 0  )   //UART1, TxD
 #define ER2_1    ( Off << 1  )   //UART1, RxD
 #define ER2_2    ( Off << 2  )   //UART1, CTS
 #define ER2_3    ( Off << 3  )   //line "GSM_SIM"
 #define ER2_4    ( Off << 4  )   //line "GSM_STAT"
 #define ER2_5    ( Off << 5  )   //UART1, DTR
 #define ER2_6    ( Off << 6  )   //line "GSM_KEY"
 #define ER2_7    ( Off << 7  )   //UART1, RTS
 #define ER2_8    ( Off << 8  )   //line "PWR_OK"?????????????????????????????????????????????????????

 #define ER2_10   ( Off << 10 )   //line "Boot"
 #define ER2_11   ( Off << 11 )   //SD/MMC, MCIDAT1
 #define ER2_12   ( Off << 12 )   //SD/MMC, MCIDAT2
 #define ER2_13   ( Off << 13 )   //SD/MMC, MCIDAT3
 #define p2ER1   ( ER2_0|ER2_1|ER2_2|ER2_3|ER2_4|ER2_5|ER2_6|ER2_7|ER2_8|ER2_10|ER2_11|ER2_12 )
 #define IO2IntEnRdef ( p2ER1|ER2_13 )

/*          I O 2 I n t E n F    D E F I N E          */
 #define EF2_0    ( Off << 0  )   //UART1, TxD
 #define EF2_1    ( Off << 1  )   //UART1, RxD
 #define EF2_2    ( Off << 2  )   //UART1, CTS
 #define EF2_3    ( Off << 3  )   //line "GSM_SIM"
 #define EF2_4    ( Off << 4  )   //line "GSM_STAT"
 #define EF2_5    ( Off << 5  )   //UART1, DTR
 #define EF2_6    ( Off << 6  )   //line "GSM_KEY"
 #define EF2_7    ( Off << 7  )   //UART1, RTS
 #define EF2_8    ( Off << 8  )   //line "PWR_OK"?????????????????????????????????????????????????????

 #define EF2_10   ( Off << 10 )   //line "Boot"
 #define EF2_11   ( Off << 11 )   //SD/MMC, MCIDAT1
 #define EF2_12   ( Off << 12 )   //SD/MMC, MCIDAT2
 #define EF2_13   ( Off << 13 )   //SD/MMC, MCIDAT3
 #define p2EF1   ( EF2_0|EF2_1|EF2_2|EF2_3|EF2_4|EF2_5|EF2_6|EF2_7|EF2_8|EF2_10|EF2_11|EF2_12 )
 #define IO2IntEnFdef ( p2EF1|EF2_13 )
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/



 #endif
#endif